package com.organize.rules;

import java.util.Collection;

/**
 * 规则上下文
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-10-15 18:27
 **/
public interface ComponentRuleContext {

    /**
     * 注册
     *
     * @param rule
     */
    void registerRule(ComponentRule rule);

    /**
     * 获取规则名称
     *
     * @param name
     * @return
     */
    ComponentRule getRule(String name);

    /**
     * 获取所有规则
     *
     * @return
     */
    Collection<ComponentRule> getRules();
}
